home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE08 / CLINIC / LISTING4.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-03-16  |  482 b   |  17 lines

  1. {Listing 4}
  2. procedure TMainForm.WMNCLButtonDblClk(var Msg: TWMNCLButtonDblClk);
  3. var
  4.   tScreenPt, ClientPt: TPoint;
  5. begin
  6.   ScreenPt.X := Msg.XCursor;
  7.   ScreenPt.Y := Msg.YCursor;
  8.   ClientPt := ScreenToClient(ScreenPt);
  9.   if (Msg.HitTest = htMenu) and (ClientPt.X < GetSystemMetrics(sm_CYMenu))
  10.     and (ActiveMDIChild <> nil) and
  11.     (ActiveMDIChild.WindowState = wsMaximized) then begin
  12.     ActiveMDIChild.Close;
  13.     Msg.Result := 0;
  14.   end else
  15.    inherited;
  16. end;
  17.